app.bust = '2';
// app.bust = Date.now();
app.dynamicLoadingCss(app.resPath+'css/diagnostic/diagnostic.css?bust='+app.bust);

app.host = 'http://uc.gzxueersi.com/index.php';
if(app.isLocal){
  app.host = '';
}
app.getParam=function(a){var b=location.search;a=a+"=";return b.indexOf(a)==-1?'':b.substring(b.indexOf(a)+a.length,b.indexOf("&",b.indexOf(a))==-1?b.length:b.indexOf("&",b.indexOf(a)))};

var t = function (n) {
  n = n + '';
  if (n.length<2) {
    return '0' + n;
  } else {
    return n;
  }
}
app.getTime = function (b) {
  b = new Date(b);
  return t(b.getMonth()+1) + '月' + t(b.getDate()) + '日 ' + t(b.getHours()) + ':' + t(b.getMinutes());
}
app.getTimeRange = function (b, e) {
  b = new Date(b);
  e = new Date(e);
  return t(b.getMonth()+1) + '月' + t(b.getDate()) + '日 ' + t(b.getHours()) + ':' + t(b.getMinutes()) + '-' + t(e.getHours()) + ':' + t(e.getMinutes());
};
app.getDateTimeRange = function (b, e) {
  b = new Date(b);
  e = new Date(e);
  var g = function (k) {
    return t(k.getFullYear()) + '-' + t(k.getMonth()+1) + '-' + t(k.getDate()) + ' ' + t(k.getHours()) + ':' + t(k.getMinutes())
  }
  return g(b) + ' ~ ' + g(e);
};
layui.config({
  dir: app.libPath + 'layui/'
}).use(['jquery','layer','form','laydate','laypage', 'upload'], function(){
  app.dynamicLoadingJs(app.resPath+'js/diagnostic/diagnostic.js?bust='+app.bust);
});
